package net.lzzy.practices.web.models;


import lombok.Getter;
import lombok.Setter;
import net.lzzy.practices.entities.Chapter;

import java.util.Date;
import java.util.UUID;
//@Getter
@Getter
@Setter

public class VmChapter {
    private UUID id;
    private String name;
    private String description;
    private boolean open;
    private Date createTime;
    private Date updateTime;
    private String courseName;
    private UUID teacherId;

    private VmChapter(){

    }
    public  static VmChapter create(Chapter chapter){
        VmChapter vm=new VmChapter();
        vm.setId(chapter.getId());
        vm.setName(chapter.getName());
        vm.setDescription(chapter.getDescription());
        vm.setOpen(chapter.isOpen());
        vm.setCreateTime(chapter.getCreateTime());
        vm.setUpdateTime(chapter.getUpdateTime());
        vm.setCourseName(chapter.getName());
        return vm;
    }
}
